package com.ms.oschina.util;

import android.app.Activity;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.ms.oschina.R;
import com.ms.oschina.ui.dialog.QuickOptionDialog;

public class DialogUtils {
	
	public static QuickOptionDialog showSeedTweetDialog(Activity activity,final View view) {
		QuickOptionDialog dialog = new QuickOptionDialog(activity,
				R.style.quick_option_dialog) {

			@Override
			public View getContentView() {
				return view;
			}
		};

		dialog.show();
		return dialog;
	}
	
	public static QuickOptionDialog showLoginDialog(Activity activity) {
		QuickOptionDialog dialog = new QuickOptionDialog(activity,
				R.style.quick_option_dialog) {
			@Override
			public View getContentView() {
				View view = UiUtils.inflate(R.layout.dialog_login);
				return view;
			}
		};
		dialog.isfillScreen(false);
		dialog.setGravity(Gravity.CENTER);
		dialog.show();
		return dialog;
	}
	
	
	public static QuickOptionDialog showSelectPhotoDialog(Activity activity) {
		QuickOptionDialog dialog = new QuickOptionDialog(activity,
				R.style.quick_option_dialog) {
			@Override
			public View getContentView() {
				View view = UiUtils.inflate(R.layout.dialog_login);
				return view;
			}
		};
		dialog.isfillScreen(false);
		dialog.setGravity(Gravity.CENTER);
		dialog.show();
		return dialog;
	}

}
